<template>
  <div>
    <HeaderTop title="我的"></HeaderTop>

    <div class="profile-info" @click="$router.push('/login')">
      <div class="user-avatar">
        <i class="iconfont icon-geren"></i>
      </div>
      <div class="user-info">
        <h2>登录 / 注册</h2>
        <i class="iconfont icon-shouji"></i>
        <span>暂未绑定手机号</span>
      </div>
      <span class="profile-more-arrow">
        <i class="iconfont icon-arrow-right-bold"></i>
      </span>
    </div>

    <div class="profile-data">
      <div class="part">
        <div>
          <span class="balance">0.00</span>元
          <p>我的余额</p>
        </div>
      </div>
      <div class="part">
        <div>
          <span class="discount">0</span>个
          <p>我的优惠</p>
        </div>
      </div>
      <div class="part">
        <div>
          <span class="score">0</span>分
          <p>我的积分</p>
        </div>
      </div>
    </div>

    <div class="profile-options">
      <div class="profile-option">
        <i class="iconfont icon-dingdan"></i>
        <span>我的订单</span>
      </div>
      <div class="profile-option">
        <i class="iconfont icon-xinyujifen"></i>
        <span>积分商城</span>
      </div>
      <div class="profile-option">
        <i class="iconfont icon-huiyuan"></i>
        <span>饱了么会员</span>
      </div>
    </div>

    <div class="profile-options">
      <div class="profile-option">
        <i class="iconfont icon-fuwu_o"></i>
        <span>服务中心</span>
      </div>
    </div>
  </div>
</template>

<script>
import HeaderTop from "../../components/HeaderTop/HeaderTop"
export default {
  name: "Profile",
  components: { HeaderTop },
}
</script>

<style lang="less" scoped>
@import "../../common/style/mixin.less";
.profile-info {
  display: flex;
  align-items: center;
  height: 10rem;
  margin-top: 4.6rem;
  padding: 0 1rem;
  border-radius: 0.5rem 0.5rem 0 0;
  background-image: linear-gradient(to right, @theme-color, darken(@theme-color, -25%));
  .user-avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    background-color: #f5f5f5;
    i {
      position: relative;
      top: -0.1rem;
      font-size: 6rem;
      color: #7e8c8d;
    }
  }
  .user-info {
    flex: 1;
    margin-left: 1.5rem;
    color: #fff;
    h2 {
      margin: 0 0 0.8rem;
      font-size: 1.8rem;
      line-height: 1.8rem;
    }
    i {
      font-size: 1.6rem;
      margin-right: 1rem;
      line-height: 1.4rem;
    }
    span {
      font-size: 1.4rem;
      line-height: 1.4rem;
    }
  }
  .profile-more-arrow {
    i {
      font-size: 2rem;
      color: #fff;
    }
  }
}

.profile-data {
  .bottom-border-1px(#e4e4e4);
  display: flex;
  height: 8rem;
  background-color: #fff;
  color: #333333;
  .part {
    flex: 1;

    &:not(:last-child) {
      border-right: 0.1rem solid #e4e4e4;
    }
    & > div {
      margin-top: 1.5rem;
      text-align: center;
      span {
        font-size: 3rem;
        line-height: 3rem;
        font-weight: 700;
        margin-left: 0.5rem;
        margin-right: 0.2rem;
        &.balance {
          color: #ec5c68;
        }
        &.discount {
          color: rgb(106, 180, 209);
        }
        &.score {
          color: #6ac20b;
        }
      }
      p {
        margin: 1rem 0 0;
        font-size: 1.4rem;
        color: #666;
      }
    }
  }
}

.profile-options {
  .top-border-1px(#f1f1f1);
  .bottom-border-1px(#f1f1f1);
  margin-top: 1rem;
  background-color: #fff;
  .profile-option {
    height: 5.2rem;
    line-height: 5.2rem;

    &:not(:last-child) {
      .bottom-border-1px(#f1f1f1);
    }
    i {
      font-size: 2.3rem;
      padding: 0 1rem;
      vertical-align: middle;
      &.icon-dingdan {
        color: #02a774;
      }
      &.icon-xinyujifen {
        color: #ff5f3e;
      }
      &.icon-huiyuan {
        color: #ff9900;
      }
      &.icon-fuwu_o {
        color: #02a776;
      }
    }
    span {
      vertical-align: middle;
    }
  }
}
</style>
